#{extends 'home.html'/}
#{set title:'Send Merge Request'/}
<script type="text/javascript" src="@{'/public/javascripts/jquery.validate.js'}"></script> 
	<script type="text/javascript" src="@{'/public/javascripts/jquery.validate.min.js'}"></script> 
	<script type="text/javascript" src="@{'/public/javascripts/validation.js'}"></script> 
<h1 class="viewTitle">Send a Merge Request</h1> 

<div class="viewContent">

<form action="@{IdeaController.sendRequest()}" id="viewMergeRequest">


	<div class="formEntry"> 

	<div class="formLabel">
	<label for="combo">Merge <a class="standardLink" href="@{Browse.viewIdea(ideaToBeMerged.id)}">${ideaToBeMerged.title}</a> with:</label>
	</div>
<select name="secondIdea" id ="combo">
#{list ideaToBeMerged.topic.ideas,as:'idea'}
	#{if !idea.isDraft && idea!=ideaToBeMerged && !idea.isPromoted && !idea.isHidden}
	<option value="${idea.id}">${idea.title}</option>
	#{/if}
#{/list} 
</select>
<div class="clear"></div>
</div>


	<div class="formEntry"> 

	<div class="formLabel">
	<label for="r">Give a valid description of what exactly you want from both ideas to be in the merged idea:<label style="font-size:12px;color:RED">*</label></label>
	</div>
	<textarea id="r"name="report" cols="80" rows="10"></textarea>
	<div class="clear"></div>
	</div>
	<input type="hidden" name="toBeMerged" value="${ideaToBeMerged.id}"/>
	<input type="submit" name="submit" value="Send Merge Request!"/>
</form>
</div>